<#if baseUrl??>
    <#assign path=baseUrl />
<#elseif request??>
    <#assign path=request.contextPath /> <#--path的目的是为了得到项目名-->
</#if>
<!DOCTYPE html>
<html>
<link rel="stylesheet" href="../bootstrap-3.3.7/css/bootstrap.min.css" />
<script type="text/javascript" src="../bootstrap-3.3.7/js/jquery.js"></script>
<script type="text/javascript" src="../bootstrap-3.3.7/js/bootstrap.min.js"></script>
<script>
    function fenye(cpage) {
        $("[name='cpage']").val(cpage)
        $("form").submit();
    }


</script>
<head>
    <meta charset="UTF-8">
    <title>后台管理页面</title>
</head>

<body>
<div class="container" style="margin:50px 10px 10px 10px" >
    <form class="form-inline" style="margin-bottom: 10px;" action="${path}/yg/ryxxgl" method="post">
        <div class="row" style="margin-top: 20px;">
            <input type="hidden" name="cpage" value="1">
            <div class="form-group form-group-sm col-xs-4">
                <label for="user_pt" class="col-sm-4 control-label" style="padding-top: 5px;">员工姓名:</label>
                <div class="col-sm-6">
                    <input type="text" class="form-control" id="user_pt" name="keyword" value="${p.keyword!}"  placeholder="请输入用户名称">
                </div>
            </div>
            <div class="form-group form-group-sm col-xs-4">
                <label for="user_phone" class="col-sm-4 control-label" style="padding-top: 5px;">手机号码:</label>
                <div class="col-sm-6">
                    <input type="text" class="form-control" id="user_phone" name="keyquery" value="${p.keyquery!}" placeholder="请输入手机号">
                </div>
            </div>
            <div class="form-group">
            <#--<a href="" class="btn btn-success btn-primary btn-block ">查询</a>-->
                <input type="submit" value="查询" class="btn btn-success btn-primary btn-block ">
            </div>
        </div>

    </form>

    <table class="table table-responsive" >

        <tr class="success" style="text-align:center">
            <td>全选<input type="checkbox" onclick="qx()"></td>
            <td>编号</td>
            <td>姓名</td>
            <td>性别</td>
            <td>学历</td>
            <td>工作经历</td>
            <td>联系方式</td>
            <td>状态</td>
            <td>操作</td>
        </tr>
			<#list yglist! as c >
			<tr class="warning" style="text-align:center">
                <td><input type="checkbox" value="${c.id!}" name="ck"></td>
                <td>${c.id!}</td>
                <td>${c.dcxdy!}</td>
                <td>${c.rsex!}</td>
                <td>${c.xueli!}</td>
                <td>${c.gzjl!}</td>
                <td>${c.lxfs!}</td>
                <td>${(c.zt==0)?string("在职","离职")}</td>
                <td>
                    <input ${(c.zt==1)?string("disabled='disabled'","")} type="button" value="修改" onclick="toupd(${c.id})" class="btn btn-success">
                    <input ${(c.zt==1)?string("disabled='disabled'","")}  type="button" value="删除" onclick="updzt(${c.id})" class="btn btn-danger">

                </td>
            </tr>
            </#list>

        <tr style="text-align: center;vertical-align: middle; ">
            <td colspan="15" style="padding-top: 20px;">
            ${p.pageUrl}
            </td>
        </tr>

    </table>
    <div class="form-group">
        <div class="col-sm-4 col-sm-offset-4">
            <input type="button" onclick="toadd()" class="form-control btn btn-info" value="添加员工">
        </div>
    </div>

</div><!--/ row -->
</body>

<script type="text/javascript">

    function updzt(id) {
        var msg = "确定办理员工离职吗?\n\n请确认！";
        if (confirm(msg)==true){
            location.href="${path}/yg/updzt?id="+id;
        }
        /*var id=$("[name='ck']:checked").val();
        var msg = "确定办理员工离职吗?\n\n请确认！";

        if (confirm(msg)==true){
            location.href="${path}/yg/updzt?id="+id;
        }*/
    }

    function qx() {
        $(".ck").prop("checked",true);
    }


    function toupd(id) {
        location="${path}/yg/toupd?id="+id;
    }
    function toadd() {
        location="${path}/yg/toadd";
    }


</script>
</html>